/* 
 * Enterprise Library Extensions - DI + ORM.
 * Copyright (C) 2006
 *
 * GNU General Public License
 *
 * This program is free software; you can redistribute 
 * it and/or modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation; either version 2 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 */
using System;

namespace ELE.EnterpriseLibrary.Naming
{
	/// <summary>
	/// This class is a useful class to wrap a class and assembly name 
	/// </summary>
  [Serializable]
	public class ClassAssemblyPair
	{
    /// <summary>
    /// Name of the class
    /// </summary>
    protected string mClassName;
    /// <summary>
    /// Name of the assembly
    /// </summary>
    protected string mAssemblyName;
    /// <summary>
    /// Construct a new class assembly pair
    /// </summary>
    /// <param name="className">Name of the class</param>
    /// <param name="assemblyName">Name of the assembly</param>
		public ClassAssemblyPair(string className, string assemblyName)
		{
			mClassName = className;
      mAssemblyName = assemblyName;
    }
    /// <summary>
    /// Construct a new class assembly pair where the assembly name is 
    /// the fully qualified name of the current assembly 
    /// meaning that the class is in the assembly
    /// </summary>
    /// <param name="className">Name of the class</param>
    public ClassAssemblyPair(string className)
    {
      mClassName = className;
      mAssemblyName = this.GetType().Assembly.FullName;
    }
    /// <summary>
    /// The class name
    /// </summary>
    public virtual string ClassName
    {
      get { return mClassName; }
      set { mClassName = value; }
    }
    /// <summary>
    /// The AssemblyName
    /// </summary>
    public virtual string AssemblyName
    {
      get { return mAssemblyName; }
      set { mAssemblyName = value; }
    }
    /// <summary>
    /// Combination of ClassName,AssemblyName (Note the comma)
    /// </summary>
    public virtual string ClassAssemblyName
    {
      get
      {
        return ClassName + "," + AssemblyName;
      }
    }
	}
}
